<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - Lịch đặt sân';
$this->widget('MyBreadcrumbs', array(
    'links'=>array('Lịch đặt sân'),
));
//print_r($lich);die();

?>

<style>
table th{
border: 1px solid silver;
height: 25px;
font-size: 9px;
}

table td{
border: 1px solid silver;
width: 35px;
height: 40px;
cursor:pointer;
padding:0px;
text-align: center;
vertical-align: middle;
}

.theader{
color: #488A8E;
}

.trowhead{
color: #488A8E;
width: 80px;
background: #F5F5F5;
font-size: 10px;
}
.trowhead span{
color: blue;
}

td a{
width:100% !important;
height:100%;
display: block;
border:1px !important;
}
tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}

</style>

<script>
function chondatsan(ngaydat, giovao, idsan){
	$("#Datsan_ngaydat").val(ngaydat);
	var n=ngaydat.split("-");
	var ngaydatsan = n[2]+"/"+n[1]+"/"+n[0];
	$("#Datsan_ngaydat").val(ngaydatsan);
	$("#Datsan_giovao").val(giovao);
	$("#Datsan_giora").val(giovao+1);
	$("#Datsan_idsan").val(idsan);
	$("#Datsan_giora_em_").html("");
	 $("#formResult").html("");
	$('#datsan-modal').modal('show');
}

$(function(){
	$('#datsan-modal').on('hidden', function () {
		window.location.reload();
	});
});
</script>

<?php 
foreach($danhsachlich as $item){
	$item['ngay'] = $ngay;
	$this->renderPartial('loadlichsan', $item);

}
?>


<?php 
$this->renderPartial('../datsan/createajax',array('model' => new Datsan()));
?>
